<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>局部组件</title>
    <script src="../js/axios.min.js"></script>
    <script src="../js/vue.js"></script>
</head>
<body>
<div id="app">
    <!--使用局部组件-->
    <login></login>
  <register></register>
</div>
</body>

<script>
    const login={
      template: "<div><h3>用户登录的局部组件</h3></div>"
    }

    const app = new Vue({
        el: "#app",   //element:元素
        data: {        //data:数据 用来vue实例对象绑定一系列数据
            msg: "通用模板",
        },
        methods: {},
        computed: {},
        components: {
            login,
            register: {
                template: "<div><h3>注册组件</h3></div>"
            }
        }
    });
</script>
</html>
